public class MainJava {
    boolean a = false;
    int b = 0;
    final String str = "1223";
    static String name = "LC";

    public static void main(String[] args) {
//        System.out.println("Hello,world!");
        System.out.println("Hello" + name);
    }

    public int max(int a, int b, Color color) {

        PersonJava personJava = new PersonJava("LC");
        personJava.getName();
        personJava.getAge();
        personJava.setAge(12);

        Person person = new Person("LC", 12);
        person.getAge();
        person.getName();
        person.setAge(13);

        Animal animal = new Dog();
        if (animal instanceof Dog) {
            //如果new的对象属于子类,则可以强转调用子类方法
            ((Dog) animal).dig();
        }


        if (a > b) {
            return a;
        } else {
            return b;
        }
    }

    public String getColorStr(Color color) {
        String str = null;
        switch (color) {
            case YELLOW:
                str = "黄色";
                break;
            case ORANGE:
                str = "橙色";
                break;
            case GREEN:
                str = "绿色";
                break;
            case BLUE:
                str = "蓝色";
                break;
            case RED:
                str = "红色";
                break;
        }
        return str;
    }
}
